<!DOCTYPE html>
<html>
	<head>
		<title></title>
		<style type="text/css">
			div{height: 100px;margin-top:20px;border:1px solid #ddd;}
		</style>
	</head>
	<body>
		<div id="a">123</div>
		<div id="b"></div>
		<div id="c"></div>
		<script type="text/javascript">
			var c = document.querySelector('#c');
			var a = document.querySelector('#a');
			var b = document.querySelector('#b');
			c.onclick = function(){
				b.innerText = a.innerText;
			}
		</script>
	</body>
</html>